package com.xinya.wanandroidclient.ui.search

import android.os.Bundle
import android.util.Log
import androidx.databinding.ViewDataBinding
import com.xinya.wanandroidclient.R
import com.xinya.wanandroidclient.base.BaseFragment
import com.xinya.wanandroidclient.databinding.FragmentSearchBinding
import com.xinya.wanandroidclient.ui.MainFragment
import com.xinya.wanandroidclient.utils.KeyBoardUtil
import kotlinx.android.synthetic.main.fragment_search.*

/**
 *
 * @ClassName:      SearchFragment
 * @Description:     java类作用描述
 * @Author:         mhzhuxinya@163.com
 * @UpdateRemark:   更新说明：
 * @Version:        1.0
 */
class SearchFragment : BaseFragment() {

    companion object {
        private const val TAG = "SearchFragment"
    }

    private lateinit var dataBinding : FragmentSearchBinding

    override fun getLayoutId() = R.layout.fragment_search

    override fun initDataBinding(binding: ViewDataBinding?) {
        dataBinding = binding as FragmentSearchBinding
    }

    override fun init(savedInstanceState: Bundle?) {
        val etSearchView = dataBinding.etSearch
        etSearchView.requestFocus()
        KeyBoardUtil.openKeyboard(etSearchView, requireContext())
    }

}